package com.fdway.action;

import java.util.ArrayList;

import com.fdway.po.Content;
import com.fdway.po.ContentDAO;
import com.fdway.po.Contype;
import com.fdway.po.ContypeDAO;
import com.opensymphony.xwork2.ActionSupport;

public class DetailAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long tyid;
	private long cid;
	private ArrayList<Contype> listty=null;
	private Contype conty;
	private Content con;
	private ArrayList<Content> conlist;
	
	@SuppressWarnings("unchecked")
	public String getDetail(){
		listty=(ArrayList<Contype>) new ContypeDAO().findAll();
		conty=new ContypeDAO().findById(tyid);
		ContentDAO condao=new ContentDAO();
		conlist=(ArrayList<Content>) condao.findByTyid(tyid);
		con=condao.findById(cid);
		return SUCCESS;
	}
	public long getTyid() {
		return tyid;
	}
	public void setTyid(long tyid) {
		this.tyid = tyid;
	}
	public ArrayList<Content> getConlist() {
		return conlist;
	}
	public void setConlist(ArrayList<Content> conlist) {
		this.conlist = conlist;
	}
	public Contype getConty() {
		return conty;
	}
	public void setConty(Contype conty) {
		this.conty = conty;
	}
	public long getCid() {
		return cid;
	}
	public void setCid(long cid) {
		this.cid = cid;
	}
	public Content getCon() {
		return con;
	}
	public void setCon(Content con) {
		this.con = con;
	}
	public ArrayList<Contype> getListty() {
		return listty;
	}
	public void setListty(ArrayList<Contype> listty) {
		this.listty = listty;
	}
	
	
	
}
